if SERVER then
	function ACHIEVEMENT:ScaleNPCDamage (npc, hitgroup, dmg) --this would be called as if it were a hook to the function it is named after.
		local atk = dmg:GetAttacker()
		if (!IsValid(atk) or !atk:IsPlayer()) then return end
		
		if ( !dmg:IsBulletDamage() ) then return end // It's obviously not H&K weaponry...
		
		local weap = atk:GetActiveWeapon()
		if ( !IsValid( weap ) ) then return end
		
		// Check it's an Heckler & Koch weapon.
		local name = weap.PrintName or ""
		--printd( name )
		if ( string.Left( name, 2 ) != "HK" ) then return end
		
		// Add the damage on.
		local damage = self:GetValue( atk, "damage", 0 )
		self:SetValue( atk, "damage", math.ceil(damage + dmg:GetDamage()) )
	end
	
	function ACHIEVEMENT:SendUpdate(ply, last)
		local damage = self:GetValue(ply, "damage", 0)
		if damage - (last or 0) > 100 then
			return damage - (last or 0), damage
		end
	end
end
if CLIENT then
	local target = 25000

	ACHIEVEMENT.Name			= "Incursion: Heckler && Koch Addict"
	ACHIEVEMENT.Description		= "Deal "..target.." points of damage using Heckler && Koch firearms."
	ACHIEVEMENT.Icon			= "achievements/incursion"

	local total = ACHIEVEMENT:GetValue("total", 0)
	function ACHIEVEMENT:ReceiveValue(value)
		if total >= target then return end
		
		total = math.min(total + value, target)
		self:SetValue("total", total)
		self:Update(total / target, math.floor(total) .. "/" .. target)
	end
	
	ACHIEVEMENT:Register(total / target, math.floor(total) .. "/" .. target)
end
